package com.leyou.utils;

import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author 岩冰
 * @version 1.0
 * @date:2018/10/15
 */
public class ThreadUtils {
    private static final ThreadPoolExecutor POOL_EXECUTOR = new
            ThreadPoolExecutor(6, 6,
            0L, TimeUnit.MILLISECONDS,
            new LinkedBlockingQueue<>());

    public static void excecute(Runnable runnable) {
        POOL_EXECUTOR.submit(runnable);
    }
}
